<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="header.jsp"/>
<html>
<head>
    <meta charset="utf-8" />
    <meta
            name="viewport"
            content="width=device-width, initial-scale=1, maximum-scale=1"
    />
    <title>EasyMDE</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/editormd/css/editormd.min.css">
    <style>
        /* .CodeMirror {
              height: 500px;

        } */
    </style>
</head>

<body>

<div class="container">
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <form action="/note/addNote" method="post">
                <div class="form-group">
                    <label for="title">标题：</label>
                    <input type="text" class="form-control input-lg" placeholder="输入标题" name="noteTitle" id="title">
                </div>
                <div class="form-group">
                    <label for="brief">概要：</label>
                    <input type="text" class="form-control input-lg" placeholder="快输入概要" id="brief" name="noteBrief">
                </div>
                <div class="row">
                    <div class="col-xs-2">
                        <div class="form-group">
                            <label for="select">类型：</label>
                            <select class="form-control input-lg" id="select" name="specialtyId">
                               <c:forEach items="${specialtyList}" var="s">
                                   <option value="${s.specialtyId}">${s.specialtyMajorName}</option>
                               </c:forEach>
                            </select>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="content">内容</label>
                    <div id="content">
                        <textarea name="noteText" placeholder="笔记内容" style="display: none;"></textarea>
                    </div>
                </div>
            <button type="submit" class="btn btn-info">发布</button>
        </form>
            <form></form>
        </div>
    </div>
</div>

        <script src="${pageContext.request.contextPath}/editormd/js/jquery.min.js"></script>
        <script src="${pageContext.request.contextPath}/editormd/js/editormd.min.js"></script>
        <script>
            var testEditor;
            $(function() {
                testEditor = editormd("content", {
                    width   : "100%",
                    height  : 500,
                    syncScrolling : "single",
                    path    : "${pageContext.request.contextPath}/editormd/lib/"
                });

            });
        </script>
</body>
</html>
